]> dgit.raspbian.org Git - gnome-shell.git/commit
iconGrid: Only animate items when we actually need it
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 24 Feb 2021 10:29:46 +0000 (11:29 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 3 Mar 2021 17:59:16 +0000 (17:59 +0000)
commit7f996550673ea417a1f0618a883d9275ae0e93cf
tree18fbee16624a8d22ef34acf283a847e2d9b1137c
parent7771bf4437d236f69121f458273743fe7d565b69
iconGrid: Only animate items when we actually need it

Animating items of the iconGrid involves calling a few more C functions,
which is quite slow. Especially calling ClutterActor.set_easing_delay()
is slow because we override that function in JS to adjust for the
animation slow-down factor. So add a small class variable to make sure
we only animate the icons of the grid when we actually need it.

This makes the average time spent in vfunc_allocate() of the iconGrid go
down to about 0.7 ms.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1713>
js/ui/iconGrid.js